<!-- Copyright (c) 2008 by 1eEurope (Switzerland) AG, Thalwil -->

function gup( name )
{  
    name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
    var regexS = "[\\?&]"+name+"=([^&#]*)";
    var regex = new RegExp( regexS );
    var results = regex.exec( window.location.href );
    if( results == null )
        return "";
    else
        return decodeURIComponent(results[1]);
}

function By1eEuropeCallSearch(caller,searchResultUrl, input)
{
    caller.href = searchResultUrl + '?k='+input;
}

function By1eEuropeClickItemOnEnter(toclick, ev)
{
	var ret = true;
	
	if (!ev)
        ev = window.event;
    
	if (ev.which && ev.which == 13 || ev.keyCode && ev.keyCode == 13) {
        if (toclick.click) {
          toclick.click();
        } else {
          MozillaLinkClick(toclick);
        }
        ret = false;
	}
	
	return ret;
}


function MozillaLinkClick(plnkNode)
{
    // Emulate click on Mozilla
    var bolFollowLink = true;
    var strTarget = null;

    // Run the link onClick event.
    if (plnkNode.onclick) {
        if (plnkNode.onclick() == false) {
            bolFollowLink = false;
        }
    }

    // Get the link target.
    if (plnkNode.target) {
        strTarget = plnkNode.target;
    }
    if (bolFollowLink) {
        if (strTarget == null) {
            window.location.href = plnkNode.href;
        } else {
            // Open using the link target.
            window.open(plnkNode.href, strTarget);
        }
    }
}